home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
biz
/
dopus
/
ImageFX.lha
/
ImageFX.dopus5
next >
Wrap
Text File
|
1997-09-06
|
3KB
|
102 lines
/*
$VER: ImageFX.dopus5 1.0 (30.8.97)
Written by Tommy Jensen
Send images to ImageFX from DirectoryOpus
Call as:
<AREXX>DOpus5:ARexx/ImageFX.dopus5
*/
/* Change this to the path where ImageFX is located (Don't remove the brackets) */
ImageFX = 'ImageFX:ImageFX'
options results
lf='0a'x /* Thanks to Edmund Vermeulen for that sneaky code :) */
if Show("P","DOPUS.1") then
address "DOPUS.1"
Else Do
exit
end
dopus version
If ( result='RESULT' | translate(result,'.',' ') < 5.1218 ) then do
dopus request '"This script requires DOpus v5.5 or greater." OK'
exit
end
lister query source
slist=result
lister query slist numselfiles
if result=0 then do
lister request slist '"No selected files."' 'OK'
exit
end
lister query slist firstsel
pic = Strip(result,"B",'"')
lister query slist path
picpath=result
lister set slist busy on
lister set slist newprogress name info title
lister set slist newprogress title 'ImageFX.dopus5 by Tommy Jensen 97'
lister set slist newprogress info 'Checking filetype'
dopus getfiletype picpath''pic'' id
picftype=result
lister set slist newprogress info ' '
lister set slist newprogress name pic' ('picftype')'
lister set slist newprogress info 'Looking for ImageFX...'
if Show("P","IMAGEFX.1") then call CHECKIFX
Else Do
dopus front
lister request slist '"ImageFX does not seem to be loaded.'lf'Load ImageFX?"' '_Yes|_No'
if rc=1 then
call LOADIFX
else do
lister set slist newprogress info 'Aborting...'
call EXIT
CHECKIFX:
address "IMAGEFX.1"
options failat 3000
GETMAIN
If rc>0 then
call SENDIFX
Else Do
parse var result name .
address "DOPUS.1"
dopus front
lister request slist '"The ImageFX main buffer is not empty.'lf'Project 'name lf'will be destroyed"' '_Continue|_Abort'
If rc=1 then
call SENDIFX
Else Do
lister set slist newprogress info 'Aborting...'
call EXIT
LOADIFX:
lister set slist newprogress info 'Launching ImageFX...'
address command "RUN >NIL: "ImageFX
address command "WaitForPort IMAGEFX.1"
address command "Wait 1" /* This is needed for some strange reason */
lister set slist newprogress info 'ImageFX loaded...'
SENDIFX:
options failat 2
address "DOPUS.1"
lister set slist newprogress info 'Loading 'picftype' file...'
address "IMAGEFX.1"
LOADBUFFER FILE picpath''pic'' FORCE /* Load picture */
SCREENTOFRONT /* Bring IFX screen to front */
address "DOPUS.1"
lister select slist pic off
EXIT:
lister refresh slist
lister set slist busy off
exit